package moviles.comprap;

import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;

import com.example.comprap.R;

public class Opciones extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_opciones);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.activity_opciones, menu);
		return true;
	}
	
	@SuppressWarnings("deprecation")
	public void showDialog(String title, String message) {
		AlertDialog alertDialog = new AlertDialog.Builder(this).create();
		alertDialog.setTitle(title);
		alertDialog.setMessage(message);
		alertDialog.setButton("Aceptar", new DialogInterface.OnClickListener() {
			@Override
			public void onClick(final DialogInterface dialog, final int which) {				
				finish();
			}
		});
		alertDialog.show();
	}
	
	
	//Botones inferiores
	
		public void buscador(View v) {
			onSearchRequested();
	    }
		
		public void opciones(View v) {
			//
	    }
		
		public void usuario(View v) {
	    	Intent intent = new Intent(this, Usuario.class);
	    	startActivity(intent);
	    }
		
		public void home(View v) {
			Intent intent = new Intent(this, MainActivity.class);
	    	startActivity(intent);
	    }
		public void verListas(View v) {finish();
    	Intent intent = new Intent(this, VerListas.class);
    	startActivity(intent);
    }

}
